import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/InputWidget.dart';
class LeftLabelInputItem extends StatefulWidget {
  String title;
  String hitText;
  bool showArrown;
  bool obscureText;
  final Function finishCallback;
  LeftLabelInputItem({this.obscureText,this.finishCallback,this.showArrown =false,this.title,this.hitText,Key key}) : super(key: key);
  @override
  _LeftLabelInputItemState createState() => _LeftLabelInputItemState();
}

class _LeftLabelInputItemState extends State<LeftLabelInputItem> {
  @override
  Widget build(BuildContext context) {
    return Container(
        color:Colors.white,
        width: ScreenUtil.screenWidth,
        height: ScreenUtil().setWidth(50),
        child:Column(
          children: [
            Container(height: ScreenUtil().setWidth(49),
              child:Row(
                children: [
                  SizedBox(width:ScreenUtil().setWidth(14) ,),
                  Container(
                    width: ScreenUtil().setWidth(80),
                    child:Text(widget.title,style: TextStyle(fontSize: ScreenUtil().setSp(15),color:Color(0xff333333)),textAlign: TextAlign.left,),
                  ),
                  SizedBox(width:ScreenUtil().setWidth(10) ,),
                  InputWidget(widget.hitText,width: 170,numlines: 1, maxlength:11,finishCallback:widget.finishCallback ,obscureText: widget.obscureText,keyBoardtype: TextInputType.text,),
                  SizedBox(width:ScreenUtil().setWidth(80) ,),
                  widget.showArrown? Container(
                    width: ScreenUtil().setWidth(8),
                    height: ScreenUtil().setWidth(14),
                    child: Image.asset("sources/yy/rightArrown.png"),
                  ):Container()
                ],
              ),),
            Container(height: ScreenUtil().setWidth(0.5),width: ScreenUtil.screenWidth,color: Color(0xffD8D8D8),),
          ],
        )
    );
  }
}
